package jp.co.sn.mml.pojo.tdkrt;

import jp.co.sn.mml.pojo.tmsst.Tmsst;

public class TdkrtId implements java.io.Serializable { 

	//施設コード
	private Tmsst ssCd;
	//カルテ番号
	private String krtNo;

	/** default constructor */
	public TdkrtId(){

	}

	/** full constructor */
	public TdkrtId(Tmsst ssCd,String krtNo){
		this.ssCd = ssCd;
		this.krtNo = krtNo;
	}

	//Property accessors
	public Tmsst getSsCd(){
		return this.ssCd;
	}

	public void setSsCd(Tmsst ssCd){
		this.ssCd=ssCd;
	}

	public String getKrtNo(){
		return this.krtNo;
	}

	public void setKrtNo(String krtNo){
		this.krtNo=krtNo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TdkrtId))
			return false;

		TdkrtId castOther = (TdkrtId) other;

		return ((this.getSsCd() ==  castOther.getSsCd())
				||(this.getSsCd()!=null && castOther.getSsCd() !=null 
					&& castOther.getSsCd() !=null 
					&& this.getSsCd().equals(castOther.getSsCd())))
			&& ((this.getKrtNo() ==  castOther.getKrtNo())
				||(this.getKrtNo()!=null && castOther.getKrtNo() !=null 
					&& castOther.getKrtNo() !=null 
					&& this.getKrtNo().equals(castOther.getKrtNo())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSsCd() == null ? 0 : this.getSsCd().hashCode());
		result = 37 * result
				+ (getKrtNo() == null ? 0 : this.getKrtNo().hashCode());
		return result;
	}

}